package com.ruanko.banking;

/**
 * 储蓄卡
 * 
 */
public class SavingsCard extends Card {

	/**
	 * 无参构造方法
	 */
	public SavingsCard() {
		super();
	}
	
	/**
	 * 带参构造方法
	 * @param money
	 */
	public SavingsCard(final double money) {
		super(money);
	}
	
	/**
	 * 储蓄卡存款
	 */
	@Override
	public void save(final double money) {
		this.balance += money * 1.05;
	}

	/**
	 * 储蓄卡取款
	 */
	@Override
	public void take(final double money) {
		if (money > this.balance) {
			System.out.printf("余额不足:%.2f\n", this.balance);
			return;
		}
		
		this.balance -= money;
	}

}
